import { lazy } from "react"
import { RouteObject } from "react-router-dom"

// 路由懒加载
const Dashboard = lazy(() => import("@/views/home/dashboard"))
const DataPlatform = lazy(() => import("@/views/home/dataPlatform"))

export default {
  id: 'home',
  path: "/home",
  redirect: "/home/dashboard",
  handle: {
    title: "首页",
    isNav: true,
  },
  children: [
    {
      path: "/home/dashboard",
      element: <Dashboard />,
      handle: {
        title: "工作台",
      }
    },
    {
      path: "/home/data",
      element: <DataPlatform />,
      handle: {
        title: "数据平台",
      }
    },
  ],
} as RouteObject
